<?php

    namespace App\Http\Controllers\Home;

    use GuzzleHttp\Client;
    use Illuminate\Http\Request;
    use App\Http\Controllers\Controller;

    class IndexController extends Controller {
        //
        public function index() {
            $client = new Client();
            $url = '192.168.0.179:86/api/login';
            $res = $client->request('post', $url, [
                'form_params' => [
                    'email' => '46914685@qq.com',
                    'password' => 'admin'
                ]
            ]);

            echo $res->getStatusCode() . '<br>';
            echo $res->getBody() . '<br>';

        }
    }
